Skip to content

fix(browser): Ignore unrealistically long INP values #16484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 5, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jun 4, 2025

We shouldn't send values INP spans if the reported value is unrealistically long. I decided to draw the line at 60 seconds for now but if anyone has concerns or wants a different upper bound, happy to change it.

Adding this check after receiving reports of hour-long INP spans.

Added some unit tests to test this.

@Lms24 Lms24 self-assigned this Jun 4, 2025
Copy link
Contributor

github-actions bot commented Jun 4, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.99 kB - -
@sentry/browser - with treeshaking flags 23.76 kB - -
@sentry/browser (incl. Tracing) 38.36 kB +0.05% +18 B 🔺
@sentry/browser (incl. Tracing, Replay) 76.47 kB -0.01% -7 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.57 kB -0.04% -22 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 81.23 kB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 93.31 kB -0.01% -3 B 🔽
@sentry/browser (incl. Feedback) 40.73 kB - -
@sentry/browser (incl. sendFeedback) 28.7 kB - -
@sentry/browser (incl. FeedbackAsync) 33.59 kB - -
@sentry/react 25.76 kB - -
@sentry/react (incl. Tracing) 40.35 kB +0.05% +18 B 🔺
@sentry/vue 28.34 kB - -
@sentry/vue (incl. Tracing) 40.2 kB +0.05% +20 B 🔺
@sentry/svelte 24.01 kB - -
CDN Bundle 25.48 kB - -
CDN Bundle (incl. Tracing) 38.53 kB +0.04% +15 B 🔺
CDN Bundle (incl. Tracing, Replay) 74.4 kB +0.04% +23 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 79.86 kB +0.09% +68 B 🔺
CDN Bundle - uncompressed 74.41 kB - -
CDN Bundle (incl. Tracing) - uncompressed 114.1 kB +0.03% +25 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 228.07 kB +0.02% +25 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 240.89 kB +0.02% +25 B 🔺
@sentry/nextjs (client) 42.01 kB +0.03% +12 B 🔺
@sentry/sveltekit (client) 38.84 kB +0.02% +6 B 🔺
@sentry/node 150.28 kB - -
@sentry/node - without tracing 98.33 kB - -
@sentry/aws-serverless 124.09 kB -0.01% -1 B 🔽

View base workflow run

@Lms24 Lms24 marked this pull request as ready for review June 5, 2025 10:10
@Lms24 Lms24 requested a review from s1gr1d June 5, 2025 10:13
@@ -22,6 +23,11 @@ import { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from '
const LAST_INTERACTIONS: number[] = [];
const INTERACTIONS_SPAN_MAP = new Map<number, Span>();

/**
* 60 seconds is the maximum for a plausible INP value
* (source: Me)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂
I hope the git blame stays with your name

@Lms24 Lms24 merged commit 6d61be0 into develop Jun 5, 2025
163 checks passed
@Lms24 Lms24 deleted the lms/fix-browser-long-inp-values branch June 5, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants